#ifndef LOGIN_H
#define LOGIN_H

#include <QWidget>
#include "socket/protocol/ClientLogin.h"
#include "globalParameter.h"
#include "interface/IInterface.h"

namespace Ui {
    class Login;
}

namespace interface
{
struct LoginParam
{
    QString name;
    QString clientId;
};

class CLoginInterface : public IInterface
{
    Q_OBJECT

public:
    explicit CLoginInterface(IInterface *parent = 0);
    ~CLoginInterface();

private Q_SLOTS:
    void login();
    void readResult();
    void socketError();

private:
    // prepare for the background setting
    virtual void UiSetting(Ui::Login *ui);

private:
    static const int HAS_PASSED = 1;

    Ui::Login *m_pUi;
    protocal::ClientLogin *m_pClientLogin;
    LoginParam m_param;
};
}
#endif // LOGIN_H
